<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js""></script>
<script>
function loadingAjax(div_id)
{
	$("#"+div_id).html('<img src="ajax-loader.gif"> saving...');
	$.ajax({
		type: "POST",
		url: "script.php",
		data: "name=John&id=28",
		success: function(msg){
			$("#"+div_id).html(msg);
		}
	});
}
</script>

<a href="javascript:void(0);" onclick="loadingAjax('myDiv');">save page</a>

<div id="myDiv"></div>